package com.hades.spring.cloud.config.resource;

import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource;

import java.io.File;

/**
 * @ClassName: FileSystemResourceLoader
 * @Description:
 * @Author: Hades
 * @created: 2021/06/03 00:34
 * @Version:1.0
 */
public class FileSystemResourceLoader extends DefaultResourceLoader {

    @Override
    protected Resource getResourceByPath(String path) {
        File file = new File(path);
        return new FileSystemContextResource(file);
    }
}
